import React, { Component } from 'react';
// import { Icon } from 'antd-mobile';
import SearchItem from '@/components/searchItem/SearchItem'
import './List.scss'
class List extends Component {
  constructor(props) {
		super(props);
    this.state = {
      list: [
        {
					img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531075029915&di=b861f0ba138fb0b5f4300c8a3f46501a&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F5%2F584f67ca38f9f.jpg',
					totalMoney: '5988.00',
					monthMoney: '388.00'
				},
				{
					img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531075029915&di=b861f0ba138fb0b5f4300c8a3f46501a&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F5%2F584f67ca38f9f.jpg',
					totalMoney: '5988.00',
					monthMoney: '388.00'
				},
				{
					img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531075029915&di=b861f0ba138fb0b5f4300c8a3f46501a&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F5%2F584f67ca38f9f.jpg',
					totalMoney: '5988.00',
					monthMoney: '388.00'
				},
				{
					img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531075029915&di=b861f0ba138fb0b5f4300c8a3f46501a&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F5%2F584f67ca38f9f.jpg',
					totalMoney: '5988.00',
					monthMoney: '388.00'
				}
      ]
    }
	}
	componentDidMount() {
    document.getElementsByTagName('title')[0].innerHTML = '商品列表'
  }
	render() {
		let height = window.screen.availHeight
		return (
			<div className="search-page" style={{minHeight: height + 'px'}}>
        <div className="tab flex center">
          <div className="tab-item active2">
          	产品中心 | 超滤机系列
          </div>
					<div className="xiajia">下架</div>
        </div>

        <div className="search-product-group flex">
          {this.state.list.map((item, index) => {
            return (
              <SearchItem data={item} key={index}/>
            )
					})}
					<div className="search-item addItem">
						<img src={require('../../images/add.png')} alt=""/>
						<div>新增商品种类</div>
					</div>
        </div>
				<div className="foot-btn">增加库存</div>
			</div>
		);
	}
}

export default List;